```sql
${item.getQueryCode()}
<%if(item.getPSDEDataQueryCodeConds()){%>\
WHERE <%item.getPSDEDataQueryCodeConds().eachWithIndex{cond,index ->
if(index>0){
out << ' AND '
}
out << cond.getCustomCond()
}}%>
```